
from task.base.baseApi import Base
import time
import allure
import task.pageObject

class PageGoods(Base):
 
    @allure.step("选择商品颜色")
    def choose_color(self):
        self.base_click(task.pageObject.loc_goods_color)
        time.sleep(1)

    @allure.step("选择商品尺码")
    def choose_size(self):
        self.base_click(task.pageObject.loc_goods_size)

    @allure.step("点击立即购买")
    def choose_buy(self):
        self.base_click(task.pageObject.loc_goods_buy)
        time.sleep(2)

    @allure.step("点击加入购物车")
    def click_add_Cart(self):
        
        self.base_click(task.pageObject.loc_goods_add_cart)

    @allure.step("点击商品详情页右上角购物车")
    def click_right_cart(self):
        self.base_click(task.pageObject.loc_goods_right_cart)